package Book01;

public class BookList {
    public Book[] booklist = new Book[10];
    public int Size = 0;

    public BookList() {
        booklist[0] = new Book("红楼梦",23,"曹雪芹");
        booklist[1] = new Book("三国演义",34,"l罗贯中");
        booklist[2] = new Book("西游记",45,"吴承恩");
        Size = 3;
    }

    public int getSize() {
        return Size;
    }

    public void setSize(int size) {
        Size = size;
    }

    public Book[] getBooklist() {
        return booklist;
    }

    public void setBooklist(Book[] booklist) {
        this.booklist = booklist;
    }
    public Book findBook(int index){
        return booklist[index];
    }


    public void setBook(int index, Book book){
        booklist[index] = book;
    }
}
